package edu.sctu.zhangwang.month201506.day20150626.chapter4.shape.shape3D;

/**
 * Created by Administrator on 2015/6/26.
 */
public class Square implements Shape3D {

    private int length;
    private int height;
    private int width;
    public int getarea;
    public int getvolnme;
    @Override
    public void area() {
    getarea = 2*(length*height+length*width+height*width);
    }

    @Override
    public void volnme() {
    getvolnme = length*height*width;
    }

    public void getArea(){
        area();
        System.out.println("长方体的面积为："+getarea);
    }
    public void getVolnme(){
        volnme();
        System.out.println("长方体的体积为:"+getvolnme);
    }

    public void setHeight(int height) {
        this.height = height;
    }

    public void setLength(int length) {
        this.length = length;
    }

    public void setWidth(int width) {
        this.width = width;
    }
}
